package cn.com.gof.structure.proxy.dynamicProxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * <p>Title: StarHandler</p>  
 * <p>Description: </p>  
 * @author WangJun
 * @date 2018年9月6日 下午5:41:30
 */
public class StarHandler implements InvocationHandler{
	private Star realStar;
	
	public StarHandler(Star realStar) {
		this.realStar = realStar;
	}
	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		// TODO Auto-generated method stub
		realStar.bookTricket();
		method.invoke(realStar, args);
		return null;
	}

}
